package com.example.helloworld;

import android.app.Activity;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.ImageView;

import com.example.helloworld.view.RoundImage;

public class UseRoundImage extends Activity {

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_use_round_image);
		
		Bitmap bitmap = BitmapFactory.decodeResource(getResources(), R.drawable.balloons);
		final RoundImage image = new RoundImage(this, bitmap, 50);
		
		ImageView view = (ImageView)findViewById(R.id.img_round);
		view.setImageDrawable(image);
		
		Button button = (Button)findViewById(R.id.btn_left);
		button.setOnClickListener(new OnClickListener() {
			@Override
			public void onClick(View v) {
				image.moveTo(10, 10);
			}
		});
	}

}
